<?php
/**
* @property CI_Loader $load
* @property CI_Form_validation $form_validation
* @property CI_Input $input
* @property CI_Email $email
* @property CI_DB_active_record $db
*
*/
class Telephone extends CI_Model
{
    const telephone='telephone';
    function  login($phoneno,$password)
    {
        $this->db->select('phoneno');
        $this->db->where('password',$password);

         $query=$this->db->get("telephone");
      //  echo $query->num_rows();
        $cust=$query->row();
        if($cust->phoneno==$phoneno)
            return true;
        else
            return false;


    }
    function get_code($phoneno)
    {
        $this->db->select('code');
        $this->db->where('phoneno',$phoneno);
        $query=$this->db->get(Telephone::telephone);
        $obj=$query->row();
        return $obj->code;
    }
    function get_id($phoneno)
    {
        $this->db->select('Id');
        $this->db->where('phoneno',$phoneno);
        $query=$this->db->get(Telephone::telephone);
        $obj=$query->row();
        return $obj->Id;
    }
}